/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package au.edu.swin.bank.persistence.entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Luke Horvat
 */
@Embeddable
public class BillPaymentPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "DATE")
    private BigInteger date;
    @Basic(optional = false)
    @Column(name = "BILLID")
    private BigInteger billid;

    public BillPaymentPK() {
    }

    public BillPaymentPK(BigInteger date, BigInteger billid) {
        this.date = date;
        this.billid = billid;
    }

    public BigInteger getDate() {
        return date;
    }

    public void setDate(BigInteger date) {
        this.date = date;
    }

    public BigInteger getBillid() {
        return billid;
    }

    public void setBillid(BigInteger billid) {
        this.billid = billid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (date != null ? date.hashCode() : 0);
        hash += (billid != null ? billid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BillPaymentPK)) {
            return false;
        }
        BillPaymentPK other = (BillPaymentPK) object;
        if (this.date != other.date) {
            return false;
        }
        if (this.billid != other.billid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "au.edu.swin.bank.persistence.entity.BillPaymentPK[date=" + date + ", billid=" + billid + "]";
    }

}
